using System;
using System.Collections.Generic;
using System.Text;

namespace Microsoft.ConnectionEngine.Registers.Core.ServiceProvider.Common
{
    /// <summary>
    /// Represents a Message type defined within Service Provider Register
    /// </summary>
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
	public class MessageType
	{
		private int messageTypeID = int.MinValue;
		/// <summary>
		/// Represents the unique identifier of the Message Type.
		/// </summary>
        public int MessageTypeID
		{
			get { return messageTypeID; }
			set { messageTypeID = value; }
		}

		private string description = string.Empty;
		/// <summary>
		/// A string representing the description of the Message Type.
		/// </summary>
        public string Description
		{
            get { return description; }
            set { description = value; }
		}

		private string xmlSchema = string.Empty;
		/// <summary>
		/// Represents a URI represent the location of the xml schema used to validate assigned with this message type unique identifier.
		/// </summary>
        public string XmlSchema
		{
			get { return xmlSchema; }
			set { xmlSchema = value; }
		}

		private string version = string.Empty;
		/// <summary>
		/// Represents the version of the message type.
		/// </summary>
        public string Version
		{
			get { return version; }
			set { version = value; }
		}

        private int serviceProviderTypeMessageTypeID = int.MinValue;

        /// <summary>
        /// A unique identifier of this message type within the ServiceProviderTypeMessageType table.
        /// </summary>
        public int ServiceProviderTypeMessageTypeID
        {
            get { return serviceProviderTypeMessageTypeID; }
            set { serviceProviderTypeMessageTypeID = value; }
        }
        private string destinationDisplayName = string.Empty;

        /// <summary>
        /// A string representing the Destination Service Provider Type associated to the ServiceProviderTypeMessageTypeID.
        /// </summary>
        public string DestinationDisplayName
        {
            get { return destinationDisplayName; }
            set { destinationDisplayName = value; }
        }
        private string sourceDisplayName = string.Empty;

        /// <summary>
        /// A string representing the Source Service Provider Type associated to the ServiceProviderTypeMessageTypeID.
        /// </summary>
        public string SourceDisplayName
        {
            get { return sourceDisplayName; }
            set { sourceDisplayName = value; }
        }


		/// <summary>
		/// Instantiates a message type object.
		/// </summary>
        public MessageType() { }

        /// <summary>
        /// Instantiates a message type object based on arguments passed as parameters.
        /// </summary>
        /// <param name="messageTypeID">Represents the unique identifier of the Message Type.</param>
        /// <param name="description">A string representing the description of the Message Type.</param>
        /// <param name="xmlSchema">Represents a URI represent the location of the xml schema used to validate assigned with this message type unique identifier.</param>
        /// <param name="version">Represents the version of the message type.</param>
        public MessageType(int messageTypeID, string description, string xmlSchema, string version) 
		{
			this.messageTypeID = messageTypeID;
            this.description = description;
			this.xmlSchema = xmlSchema;
			this.version = version;
		}
		
	}

    /// <summary>
    /// Represents a collection of MessageTypes.
    /// </summary>
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class MessageTypesList
    {
        private List<MessageType> messageTypeList;

        /// <summary>
        /// The collection of message types being provided.
        /// </summary>
        [System.Xml.Serialization.XmlElementAttribute("MessageType")]
        public List<MessageType> Items
        {
            get { return messageTypeList; }
            set { messageTypeList = value; }
        }

        /// <summary>
        /// Instantiates a message type list object.
        /// </summary>
        public MessageTypesList()
        {
            messageTypeList = new List<MessageType>();
        }

        /// <summary>
        /// Instantiates a message type list object.
        /// </summary>
        /// <param name="newMessageTypeList">The collection of message types being provided.</param>
        public MessageTypesList(List<MessageType> newMessageTypeList)
        {
            messageTypeList = newMessageTypeList;
        }
    }

    /// <summary>
    /// Represents the search criteria for the message type search service.
    /// </summary>
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class MessageTypeSearchRequest
    {
        private string description = string.Empty;

        /// <summary>
        /// A string representing the description of the Message Type.
        /// </summary>
        public string Description
        {
            get { return description; }
            set { description = value; }
        }
        private string version = string.Empty;

        /// <summary>
        /// Represents the version of the message type.
        /// </summary>
        public string Version
        {
            get { return version; }
            set { version = value; }
        }
        private string sourceServiceProviderTypeID = string.Empty;

        /// <summary>
        /// A unique identifier of a Source Service Provider Type.
        /// </summary>
        public string SourceServiceProviderTypeID
        {
            get { return sourceServiceProviderTypeID; }
            set { sourceServiceProviderTypeID = value; }
        }
        private string destinationServiceProviderTypeID = string.Empty;

       /// <summary>
        /// A unique identifier of a Destination Service Provider Type.
       /// </summary>
        public string DestinationServiceProviderTypeID
        {
            get { return destinationServiceProviderTypeID; }
            set { destinationServiceProviderTypeID = value; }
        }

        /// <summary>
        /// Instantiates a new Message Type Search object.
        /// </summary>
        public MessageTypeSearchRequest()
        {
            
        }
    }



    /// <summary>
    /// Represents a record of the ServiceProviderTypeMessageType table within the Service Provider Register.
    /// </summary>
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class ServiceProviderTypeMessageType
    {
        private int serviceProviderTypeMessageTypeID = int.MinValue;
        
        /// <summary>
        /// A unique identifier of this message type within the ServiceProviderTypeMessageType table.
        /// </summary>
        public int ServiceProviderTypeMessageTypeID
        {
            get { return serviceProviderTypeMessageTypeID; }
            set { serviceProviderTypeMessageTypeID = value; }
        }


        private MessageType messageType = new MessageType();
        /// <summary>
        /// An object representation of the  Message Type associated to this record.
        /// </summary>
        public MessageType MessageType
        {
            get { return messageType; }
            set { messageType = value; }
        }

        private ServiceProviderType sourceServiceProviderType = new ServiceProviderType();
        /// <summary>
        /// An object representation of the Source Service Provider Type associated with this record.
        /// </summary>
        public ServiceProviderType SourceServiceProviderType
        {
            get { return sourceServiceProviderType; }
            set { sourceServiceProviderType = value; }
        }

        private ServiceProviderType destinationServiceProviderType = new ServiceProviderType();
        
        /// <summary>
        /// An object representatino of the Destination Service Provider Type associated with this record.
        /// </summary>
        public ServiceProviderType DestinationServiceProviderType
        {
            get { return destinationServiceProviderType; }
            set { destinationServiceProviderType = value; }
        }

        /// <summary>
        /// Instantiates a new ServiceProviderTypeMessageType object.
        /// </summary>
        public ServiceProviderTypeMessageType() { }

        /// <summary>
        /// Instantiates a new ServiceProviderTypeMessageType object based on arguments passed as parameters.
        /// </summary>
        /// <param name="serviceProviderTypeMessageTypeID">A unique identifier of this message type within the ServiceProviderTypeMessageType table.</param>
        /// <param name="messageType">An object representation of the Message Type associated with this record.</param>
        /// <param name="sourceServiceProviderType">An object representation of the Source Service Provider Type associated with this record.</param>
        /// <param name="destinationServiceProviderType">An object representatino of the Destination Service Provider Type associated with this record.</param>
        public ServiceProviderTypeMessageType(int serviceProviderTypeMessageTypeID, MessageType messageType,
            ServiceProviderType sourceServiceProviderType, ServiceProviderType destinationServiceProviderType)
        {
            this.serviceProviderTypeMessageTypeID = serviceProviderTypeMessageTypeID;
            this.messageType = messageType;
            this.sourceServiceProviderType = sourceServiceProviderType;
            this.destinationServiceProviderType = destinationServiceProviderType;
        }

    }


    /// <summary>
    /// Represents a colletion of ServiceProviderTypeMessageType records.
    /// </summary>
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class ServiceProviderTypeMessageTypes
    {
        private List<ServiceProviderTypeMessageType> serviceProviderTypeMessageTypeList;

        /// <summary>
        /// The ServiceProviderTypeMessageType collection being provided.
        /// </summary>
        [System.Xml.Serialization.XmlElementAttribute("ServiceProviderTypeMessageType")]
        public List<ServiceProviderTypeMessageType> Items
        {
            get { return serviceProviderTypeMessageTypeList; }
            set { serviceProviderTypeMessageTypeList = value; }
        }  
          
        /// <summary>
        /// Instantiates a new ServiceProviderTypeMessageTypes object.
        /// </summary>
        public ServiceProviderTypeMessageTypes()
        {
            serviceProviderTypeMessageTypeList = new List<ServiceProviderTypeMessageType>();
        }

        /// <summary>
        /// Instantiates a new ServiceProviderTypeMessageTypes object based on arguments passed as parameters.
        /// </summary>
        /// <param name="newserviceProviderTypeMessageTypeList">The ServiceProviderTypeMessageType collection being provided.</param>
        public ServiceProviderTypeMessageTypes(List<ServiceProviderTypeMessageType> newserviceProviderTypeMessageTypeList)
        {
            serviceProviderTypeMessageTypeList = newserviceProviderTypeMessageTypeList;
        }
    }


    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class ServiceProviderTypeMessageTypeLink
    {
        private int serviceProviderTypeMessageTypeID = int.MinValue;
        public int ServiceProviderTypeMessageTypeID
        {
            get { return serviceProviderTypeMessageTypeID; }
            set { serviceProviderTypeMessageTypeID = value; }
        }

        private int messageTypeID = int.MinValue;
        public int MessageTypeID
        {
            get { return messageTypeID; }
            set { messageTypeID = value; }
        }

        private string description = string.Empty;

        public string Description
        {
            get { return description; }
            set { description = value; }
        }
        
        private int sourceServiceProviderTypeID = int.MinValue;
        public int SourceServiceProviderTypeID
        {
            get { return sourceServiceProviderTypeID; }
            set { sourceServiceProviderTypeID = value; }
        }

        private int destinationServiceProviderTypeID = int.MinValue;
        /// <summary>
        /// Type ID for the Destination Service Provider
        /// </summary>
        public int DestinationServiceProviderTypeID
        {
            get { return destinationServiceProviderTypeID; }
            set { destinationServiceProviderTypeID = value; }        
        }

        private string sourceDisplayName = string.Empty;

        public string SourceDisplayName
        {
            get { return sourceDisplayName; }
            set { sourceDisplayName = value; }        
        }

        private string destinationDisplayName = string.Empty;

        public string DestinationDisplayName
        {
            get { return destinationDisplayName; }
            set { destinationDisplayName = value; }
        }

        public ServiceProviderTypeMessageTypeLink() { }

        public ServiceProviderTypeMessageTypeLink(int serviceProviderTypeMessageTypeID, int messageTypeID,
            int sourceServiceProviderTypeID, int destinationServiceProviderTypeID)
        {
            this.serviceProviderTypeMessageTypeID = serviceProviderTypeMessageTypeID;
            this.messageTypeID = messageTypeID;
            this.sourceServiceProviderTypeID = sourceServiceProviderTypeID;
            this.destinationServiceProviderTypeID = destinationServiceProviderTypeID;
        }

    }


    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class ServiceProviderTypeMessageTypeLinks
    {
        private List<ServiceProviderTypeMessageTypeLink> serviceProviderTypeMessageTypeLinkList;

        [System.Xml.Serialization.XmlElementAttribute("ServiceProviderTypeMessageTypeLink")]
        public List<ServiceProviderTypeMessageTypeLink> Items
        {
            get { return serviceProviderTypeMessageTypeLinkList; }
            set { serviceProviderTypeMessageTypeLinkList = value; }
        }

        public ServiceProviderTypeMessageTypeLinks()
        {
            serviceProviderTypeMessageTypeLinkList = new List<ServiceProviderTypeMessageTypeLink>();
        }

        public ServiceProviderTypeMessageTypeLinks(List<ServiceProviderTypeMessageTypeLink> newserviceProviderTypeMessageTypeLinkList)
        {
            serviceProviderTypeMessageTypeLinkList = newserviceProviderTypeMessageTypeLinkList;
        }
    }

}
